<template>
  <div class="function-repair">
    <div class="repair-question">
      <div class="text-left" ref="textLeft">
        <span>问题类型</span>
      </div>
      <div class="text-right">
        <span>请选择</span>
        <van-icon name="arrow"></van-icon>
      </div>
    </div>
    <!-- 留言 -->
    <div class="repair-message">
      <van-field
        v-model="message"
        type="textarea"
        maxlength="200"
        placeholder="请输入留言"
        show-word-limit
      />
    </div>
    <!-- 上传图片 -->
    <div class="repair-upload">
      <h5>添加图片</h5>
      <van-uploader />
    </div>
    <!-- 手机号 -->
    <div class="repair-phone">
      <van-cell-group>
        <van-field v-model="phone" type="phone" label="手机号(选填)" placeholder="请输入手机号" />
      </van-cell-group>
    </div>
    <div class="repair-email">
      <van-field v-model="email" type="email" label="邮箱(选填)" placeholder="请输入邮箱" />
    </div>
  </div>
</template>
<script>
export default {
  name: 'functionRepair',
  data() {
    return {
      message: '',
      phone: '',
      email: ''
    }
  }
}
</script>

<style lang="scss" scoped>
.function-repair {
  width: 100%;
  height: 100%;
  background-color: #fff;
  // 问题选择
  .repair-question {
    width: 100%;
    height: $height*1.5;
    line-height: $height*1.5;
    display: flex;
    justify-content: space-between;
    border-top: 4px solid $bgcolor;
    border-bottom: 4px solid $bgcolor;
    padding-left: 15px;
    box-sizing: border-box;
    .text-left {
      width: auto;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      .svg-icon {
        color: $color;
      }
    }
    .text-right {
      padding-right: 20px;
      box-sizing: border-box;
      font-size: 12px;
      display: flex;
      align-items: center;
    }
  }
  // 留言
  .repair-message /deep/ {
    width: 94%;
    height: $height*3;
    border: 2px solid $bgcolor;
    margin: 10px auto;
    .van-field {
      height: 100%;
      background-color: $bgcolor;
    }
    .van-field--min-height .van-field__control {
      min-height: 90px;
    }
  }
  // 上传图片
  .repair-upload /deep/ {
    padding: 0 15px;
    box-sizing: border-box;
    margin: 10px 0;
    h5 {
      color: #666;
      font-weight: 400;
      font-size: 14px;
      margin-bottom: 10px;
    }
    .van-uploader__upload {
      background-color: $bgcolor;
    }
  }
  // 手机号
  .repair-phone {
    border-top: 2px solid $bgcolor;
    border-bottom: 2px solid $bgcolor;
  }
}
</style>